<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::any('weChat','web\UserController@weChat');//配置微信响应接口

Route::group(['namespace' => 'web'],function (){
    Route::group(['prefix' => 'weixin'],function(){
        Route::get('getOpenID','UserController@getOpenID');//获取用户信息
    });
});


Route::group(['namespace' => 'Api','prefix' => 'v1'],function(){
    Route::get('/', function () {       //代理到前端页面
        return redirect('http://localhost:8080');
    });
    Route::group(['prefix' => 'user'],function (){
        Route::post('login','UserController@login');//用户登陆
    });
});


